package com.martin.fast_frame_compose.page.dialog

import com.martin.fast_frame_compose.base.BaseViewModel
import com.martin.fast_frame_compose.page.dialog.bottom.BottomDemoDialogModel
import com.martin.lib_base.ktx.showToast

class DialogViewModel : BaseViewModel() {

    val actionList = listOf(
        "AlertDialog",
        "中间弹窗",
        "底部弹窗",
        "顶部弹窗",
    )

    val bottomModel by lazy {
        BottomDemoDialogModel {
            showToast("底部弹窗 - $it")
        }
    }

    fun onActionClick(action: String) {
        when (action) {
            "AlertDialog" -> {
            }

            "中间弹窗" -> {
            }

            "底部弹窗" -> {
                bottomModel.show()
            }

            "顶部弹窗" -> {
            }
        }
    }

}